/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stealth;

import com.golden.gamedev.GameLoader;
import java.awt.Dimension;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author Joshua Mabrey
 */
public class Main {

    public static StealthGame game;
    public static GameLoader gameLoader;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException ex) {
        } catch (InstantiationException ex) {
        } catch (IllegalAccessException ex) {
        } catch (UnsupportedLookAndFeelException ex) {
        }
        /*
         * So what if we cant set the lookandfeel, its going to fall back on the
         * default swing look and feel
         */
        int result = JOptionPane.showConfirmDialog(null, "Do you wish to run the game fullscreen?", "Fullscreen Option", JOptionPane.YES_NO_OPTION);
        boolean fullscreen = false;
        if (result == JOptionPane.YES_OPTION) {
            fullscreen = true;
        }
        System.setProperty("sun.java2d.translaccel", "true");
        System.setProperty("sun.java2d.ddforcevram", "true");
        gameLoader = new GameLoader();
        game = new StealthGame();
        gameLoader.setup(game, new Dimension(1024, 768), fullscreen);// might add fourth boolean arguement (buffer Strategy)
        game.bsGraphics.setWindowTitle("= S P A C E =");
        gameLoader.setWindowTitle("= S P A C E =");
        gameLoader.start();
    }
}
